<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('服务人员项目统计')" />
</head>
<body class="gray-bg">
	<div class="container-div ">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="ordinary-form">
					<input type="hidden" name="params[serverUserId]" th:value="${serverUserId}"/>
					<input type="hidden" name="params[deptId]" th:value="${deptId}"/>
					<input type="hidden" name="params[recycleType]" th:value="${recycleType}"/>
					<div class="select-list">
						<ul>
							<li>
								<label>技师名字： </label>
								<input type="text" id="serverUserName" placeholder="技师名字" name="params[serverUserName]"/>
							</li>
							<li class="select-time">
								<label>创建时间： </label>
								<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
								<span>-</span>
								<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
							</li>

							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
			<div class="btn-group-sm hidden" id="toolbar" role="group">
				<a class="btn btn-warning" onclick="$.table.exportExcel()">
		            <i class="fa fa-download"></i> 导出
		        </a>
	        </div>
	        
	        <div class="col-sm-12 select-table table-striped">
			    <table id="bootstrap-table"></table>
			</div>
		</div>
	</div>
	<th:block th:include="include :: footer" />
	<th:block th:include="include :: bootstrap-table-export-js" />
	<script th:inline="javascript">
		var prefix = ctx + "statistics";
		var statusDatas = [[${@dict.getType('server_order_status')}]];

		$(function() {
		    var options = {
		        url: prefix + "/v3_detail_list",
		        createUrl: prefix + "/add",
		        updateUrl: prefix + "/edit/{id}",
		        removeUrl: prefix + "/remove",
		        exportUrl: prefix + "/export",
		        modalName: "预约项目统计详情",
		        showExport: true,
		        sortName: "createTime",
		        sortOrder: "desc",
		        columns: [{
		            checkbox: true
		        },
		        {
		            field: 'server_user_name',
		            title: '技师名字'
		        },
		        {
		            field: 'recycle_type',
		            title: '项目名称',
		            sortable: true
		        },
		        {
		            field: 'status',
		            title: '状态',
		            sortable: true,
		            formatter: function(value, row, index) {
                       return $.table.selectDictLabel(statusDatas, value);
                    }
		        },
		        {
		            field: 'pre_time',
		            title: '预约时间',
		            sortable: true
		        },
		        {
		            field: 'create_time',
		            title: '创建时间',
		            sortable: true
		        },
		        {
		            field: 'dept_name',
		            title: '门店',
		            sortable: true
		        }
		        ]
		    };
		    $.table.init(options);
		});
	</script>
</body>
</html>